// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from '@views/App'
import router from '@router'
import Mixins from '@mixins'
import '@sass/common.sass'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.min.css'
import 'swiper/dist/css/swiper.css'
// 自定义指令
import '@directive'
// 解决ios点击延迟问题
import FastClick from 'fastclick'
import VueClipboard from 'vue-clipboard2'
// 加载store
import store from '@store'
// 加载全局工具区域选择组件
// import Area from '@components/plugin/area'
// 图片懒加载
import '@/auth'
import VueLazyload from 'vue-lazyload'
// 导入接口api
import Api from '@api/plugin'
import uiLogin from '@components/plugins/login'
// 注册全局头部组件
import uiHeader from '@components/header'
Vue.component('ui-header', uiHeader)
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: require('@assets/default.png'),
  loading: require('@assets/loading.gif'),
  attempt: 1
})
Vue.use(uiLogin)
Vue.use(Api)
Vue.use(VueClipboard)
Vue.use(MintUI)
Vue.mixin(Mixins)
FastClick.attach(document.body)
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
